package dt.inlee.system.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import dt.inlee.common.pagination.SearchBean;
import dt.inlee.system.dao.api.IKqSysroleBuildingDao;
import dt.inlee.system.model.KqSysroleBuildingEntity;

@Service("kqSysroleBuildingService")
public class KqSysroleBuildingService{
	@Resource(name="kqSysroleBuildingDao")
	private IKqSysroleBuildingDao kqSysroleBuildingDao;
 

	/**
	 * Add a data
	 * @param 
	 * @return
	 */
	public int save(KqSysroleBuildingEntity entity) {
		return kqSysroleBuildingDao.save(entity);
	}
	
	/**
	 * Update a data
	 * @param 
	 * @return
	 */
	public void update(KqSysroleBuildingEntity entity) {
		kqSysroleBuildingDao.update(entity);
	}

	/**
	 * Show a data
	 * @param id
	 * @return
	 */
	public KqSysroleBuildingEntity getKqSysroleBuildingById(Integer id) {		 
		return kqSysroleBuildingDao.get(id);
	}
	
	
	/**
	 * Delete an object by id
	 * @param HolidayEntity
	 * @return
	 */
	public void deleteById(int id) {
		kqSysroleBuildingDao.delete(id);
    }
	
	
	public List<KqSysroleBuildingEntity> getList(SearchBean sb)
	{
		return this.kqSysroleBuildingDao.find(sb);
	}

}